package com.hpjpw.idoapp.controller;

import com.hpjpw.idoapp.domain.WorkerRegisterVo;
import com.hpjpw.idoapp.service.IDoWorkerService;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/ido/app/user/worker")
public class IDoWorkerRegisterController extends BaseController {

    @Autowired
    private IDoWorkerService iDoWorkerService;

    /**
     * 企业员工注册
     */
    @ApiOperation("企业员工注册")
    @PostMapping("/register")
    public AjaxResult workerRegister(@RequestBody @Validated WorkerRegisterVo workerRegisterVo) {
        return iDoWorkerService.addWorker(workerRegisterVo, "workerReg");
    }

}
